﻿using System;
using System.Data;
using System.Collections.Generic;
namespace eTMS.DAO{
	/********************************BEGIN SoCoSinhVienChiTietDAO****************************************/
	///<summary>
	/// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
	/// <para>Date:16/08/2010 29:02:17</para>
	/// <para>Class Name: SoCoSinhVienChiTietDAO</para>
	/// <para>Description: Class access to table SoCoSinhVienChiTiet in database. Class for coder code here</para>
	///</summary>

	
	public partial class SoCoSinhVienChiTietDAO{
        public DataSet SelectAllDSWithKhoanTienByListSoCoSinhVien_ID(List<int> lsSoCo_ID)
        {
            IDbCommand cmd = this.CreateCommand();
            cmd.CommandText = @"SELECT        SoCoSinhVienChiTiet.SoCoSinhVienChiTiet_ID, SoCoSinhVienChiTiet.SoCoSinhVien_ID, SoCoSinhVienChiTiet.KhoanTien_ID, SoCoSinhVienChiTiet.SoTien, 
                                KhoanTien.TenKhoanTien, KhoanTien.MaKhoanTien
                        FROM            SoCoSinhVienChiTiet INNER JOIN
                            KhoanTien ON SoCoSinhVienChiTiet.KhoanTien_ID = KhoanTien.KhoanTien_ID";
            cmd.CommandText += " WHERE  SoCoSinhVienChiTiet.SoCoSinhVien_ID IN(" + string.Join(",", lsSoCo_ID.ConvertAll<string>(Convert.ToString).ToArray()) + ")";
            return this.SelectDS(cmd);
        }
        public bool DeleteBySoCoSinhVien_ID(int SoCoSinhVien_ID)
        {
            IDbCommand cmd = this.CreateDeleteAllCommand();
            cmd.CommandText += " WHERE SoCoSinhVien_ID=" + SoCoSinhVien_ID.ToString();
            return this.ExcuteNoneQuery(cmd);
        }
	}
	/*****************************************************************************************************/
	/**********************************END SoCoSinhVienChiTietDAO*****************************************/
	/*****************************************************************************************************/
}

